﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="FilePackageManagerControl.ascx.cs"
    Inherits="controls_FilePackageManagerControl" %>
<%@ Register Src="~/_controltemplates/toolbar.ascx" TagName="ToolBar" TagPrefix="SharePoint" %>
<%@ Register TagPrefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls"
    Assembly="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<div class="ms-descriptiontext" style="margin-bottom: 10px;">
    Uploaded at
    <asp:Literal runat="server" ID="ltrlCreateDate"></asp:Literal> to <asp:Literal runat="server" ID="ltrlStoreType"></asp:Literal>.
</div>
<div style="margin-top: 5px;">
    <SharePoint:ToolBar runat="server">
        <template_buttons>
                                <asp:PlaceHolder ID="PlaceHolder1" runat="server">
                                    &nbsp;<span class="ms-linksectionheader"><b>Files</b></span>
                                </asp:PlaceHolder>
                            </template_buttons>
    </SharePoint:ToolBar>
    <SharePoint:SPGridView runat="server" AutoGenerateColumns="false" ID="gvFiles" Style="margin-top: 5px;">
        <Columns>
            <asp:TemplateField HeaderText="Type" ItemStyle-Width="30px">
                <ItemTemplate>
                    <img src="<%# ( (FileItem) Container.DataItem).FileUrl %>" />
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Name" ItemStyle-Width="60%">
                <ItemTemplate>
                    <a target="_blank" href="<%# ( (FileItem) Container.DataItem).DownloadUrl %>">
                        <%# ( (FileItem) Container.DataItem).FileName %>
                    </a>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="File Size">
                <ItemTemplate>
                    <%# ( (FileItem) Container.DataItem).FileSize %>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Will be deleted on">
                <ItemTemplate>
                    <%# ( (FileItem) Container.DataItem).FileDeletionDate %>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Delete" ItemStyle-Width="10px" ItemStyle-HorizontalAlign="Center">
                <ItemTemplate>
                    <asp:Image ID="Image1" runat="server" ImageUrl="~/_layouts/images/DELITEM.GIF" />
                </ItemTemplate>
            </asp:TemplateField>
        </Columns>
    </SharePoint:SPGridView>
</div>
<div style="margin-top: 20px">
    <SharePoint:ToolBar runat="server">
        <template_buttons>
                                <asp:PlaceHolder ID="PlaceHolder3" runat="server">
                                    &nbsp;<span class="ms-linksectionheader"><b>Recipients &amp; Downloads </b></span>
                                </asp:PlaceHolder>
                            </template_buttons>
    </SharePoint:ToolBar>
</div>
<div style="margin-top: 5px">
    <SharePoint:SPGridView runat="server" ID="gvRecipientStatuses" AutoGenerateColumns="false"
        Style="margin-top: 5px;">
        <Columns>
            <asp:TemplateField HeaderText="Recipient" HeaderStyle-Width="80%">
                <ItemTemplate>
                    <%# ( (RecipientStatusInformation) Container.DataItem).RecipientEmail %>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Download Status (downloaded / all)" HeaderStyle-HorizontalAlign="Center"
                ItemStyle-HorizontalAlign="Center">
                <ItemTemplate>
                    <%# ( (RecipientStatusInformation) Container.DataItem).StatusString %>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Resend">
                <ItemTemplate>                    
                    <asp:LinkButton runat="server" ID="lbResend" Text="Resend" OnClick="lbResend_Click"></asp:LinkButton>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Revoke">
                <ItemTemplate>
                    <a href="#" title="Make the recipient's link to download inactive">Revoke </a>
                </ItemTemplate>
            </asp:TemplateField>
        </Columns>
    </SharePoint:SPGridView>
    <div style="margin-top: 5px; padding-left: 4px;">
        <table width="98%">
            <tr>
                <td width="50%">
                    <asp:HyperLink runat="server" ID="hlOpenDownloadReport" Target="_blank" Text="Open the download report"></asp:HyperLink>
                </td>
                <td width="50%" align="right">
                    Total downloads: 0
                </td>
            </tr>
            <tr>
                <td colspan="2">
                    <asp:LinkButton runat="server" ID="lbAddRecipients" Text="Add recipients..." OnClick="lbAddRecipients_Click"></asp:LinkButton>
                </td>
            </tr>
        </table>
    </div>
</div>
<div style="margin-top: 5px; padding-left: 4px;" id="divNewRecipients" runat="server" visible="false">
    <table cellspacing="0" cellpadding="0" border="0" width="100%" class="ms-descriptiontext">
        <tbody>
            <tr>
                <td height="1" colspan="2" class="ms-sectionline">
                </td>
            </tr>
            <tr>
                <td valign="top" class="ms-descriptiontext">
                    <table cellspacing="0" cellpadding="1" border="0" width="100%">
                        <tbody>
                            <tr>
                                <td class="ms-descriptiontext ms-inputformdescription" style="padding-top: 5px;">
                                    Type email addresses of the persons who will receive the link to the files. 
                                    Use ';', ',', space or enter as separator. 
                                    
                                    <div style="margin-top:5px;">
                                        <div> <b>Example</b> </div>
                                    
                                        <i>ivan.petrov@memo.ikea.com;elena.alekseeva@memo.ikea.com; patrick.suiyze@gmail.com </i>
                                    </div>
                                </td>
                                <td>
                                    <img height="1" width="8" alt="" src="/_layouts/images/blank.gif" />
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <img height="19" width="150" alt="" src="/_layouts/images/blank.gif" />
                                </td>
                            </tr>
                        </tbody>
                    </table>
                </td>
                <td align="left" valign="top" class="ms-authoringcontrols ms-inputformcontrols">
                    <table cellspacing="0" cellpadding="0" border="0" width="100%">
                        <tbody>
                            <tr>
                                <td width="9">
                                    <img height="7" width="9" alt="" src="/_layouts/images/blank.gif" />
                                </td>
                                <td>
                                    <img height="7" width="150" alt="" src="/_layouts/images/blank.gif" />
                                </td>
                                <td width="10">
                                    <img height="1" width="10" alt="" src="/_layouts/images/blank.gif" />
                                </td>
                            </tr>
                            <tr>
                                <td>
                                </td>
                                <td class="ms-authoringcontrols">
                                    <asp:TextBox ID="txtRecipients" runat="server" TextMode="MultiLine" Width="100%" 
                                        Height="200px" CssClass="ms-input" Style="border: 1px #666666 solid"></asp:TextBox>
                                </td>
                                <td width="10">
                                    <img height="1" width="10" alt="" src="/_layouts/images/blank.gif" />
                                </td>
                            </tr>
                            <tr>
                                <td>
                                </td>
                                <td class="ms-authoringcontrols">
                                    <table>
                                        <tr>
                                            <td>
                                                <table cellspacing="0" cellpadding="0" class="vista_toolbar" width="150px" id="tblApplyRecipients"
                                                    runat="server" >
                                                    <tbody>
                                                        <tr>
                                                            <td valign="top" class="vista_toolbar_leftborder" />
                                                            <td align="center" class="vista_toolbar_content">
                                                                <table align="center">
                                                                    <tbody>
                                                                        <tr>
                                                                            <td align="center" />
                                                                            <td>
                                                                                <asp:LinkButton runat="server" ID="lbApplyRecipients" Text="Send" OnClick="btnApplyRecipients_Click"></asp:LinkButton>
                                                                            </td>
                                                                        </tr>
                                                                    </tbody>
                                                                </table>
                                                            </td>
                                                        </tr>
                                                    </tbody>
                                                </table>
                                            </td>
                                            <td>
                                                <table cellspacing="0" cellpadding="0" class="vista_toolbar" width="150px" 
                                                    >
                                                    <tbody>
                                                        <tr>
                                                            <td valign="top" class="vista_toolbar_leftborder" />
                                                            <td align="center" class="vista_toolbar_content">
                                                                <table align="center">
                                                                    <tbody>
                                                                        <tr>
                                                                            <td align="center" />
                                                                            <td>
                                                                                <asp:LinkButton runat="server" ID="lbCancelRecipients" Text="Cancel" OnClick="btnCancelRecipients_Click"></asp:LinkButton>
                                                                            </td>
                                                                        </tr>
                                                                    </tbody>
                                                                </table>
                                                            </td>
                                                        </tr>
                                                    </tbody>
                                                </table>
                                            </td>
                                        </tr>
                                    </table>
                                </td>
                                <td width="10">
                                    <img height="1" width="10" alt="" src="/_layouts/images/blank.gif" />
                                </td>
                            </tr>
                            <tr>
                                <td>
                                </td>
                                <td>
                                    <img height="13" width="150" alt="" src="/_layouts/images/blank.gif" />
                                </td>
                                <td>
                                </td>
                            </tr>
                        </tbody>
                    </table>
                </td>
            </tr>
            <tr id="Tr2">
                <td height="1" colspan="2" class="ms-sectionline">
                </td>
            </tr>
        </tbody>
    </table>
</div>
</div>
<div style="margin-top: 20px">
    <SharePoint:ToolBar runat="server">
        <template_buttons>
                                <asp:PlaceHolder ID="PlaceHolder2" runat="server">
                                    &nbsp;<span class="ms-linksectionheader"><b> Comments </b></span>
                                </asp:PlaceHolder>
                            </template_buttons>
    </SharePoint:ToolBar>
</div>
<div style="margin-top: 5px; padding-left: 2px;">
    <table cellspacing="0" cellpadding="0" border="0" width="100%" class="ms-descriptiontext">
        <tbody>
            <tr>
                <td height="1" colspan="2" class="ms-sectionline">
                </td>
            </tr>
            <tr>
                <td valign="top" class="ms-descriptiontext">
                    <table cellspacing="0" cellpadding="1" border="0" width="100%">
                        <tbody>
                            <tr>
                                <td class="ms-descriptiontext ms-inputformdescription" style="padding-top: 5px;">
                                    This text is included in email message which will be send to recipients.
                                </td>
                                <td>
                                    <img height="1" width="8" alt="" src="/_layouts/images/blank.gif" />
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <img height="19" width="150" alt="" src="/_layouts/images/blank.gif" />
                                </td>
                            </tr>
                        </tbody>
                    </table>
                </td>
                <td align="left" valign="top" class="ms-authoringcontrols ms-inputformcontrols">
                    <table cellspacing="0" cellpadding="0" border="0" width="100%">
                        <tbody>
                            <tr>
                                <td width="9">
                                    <img height="7" width="9" alt="" src="/_layouts/images/blank.gif" />
                                </td>
                                <td>
                                    <img height="7" width="150" alt="" src="/_layouts/images/blank.gif" />
                                </td>
                                <td width="10">
                                    <img height="1" width="10" alt="" src="/_layouts/images/blank.gif" />
                                </td>
                            </tr>
                            <tr>
                                <td>
                                </td>
                                <td class="ms-authoringcontrols">
                                    <asp:Label runat="server" ID="lblUploadComments"></asp:Label>
                                    <asp:TextBox ID="txtUploadComments" runat="server" TextMode="MultiLine" Width="100%"
                                        Visible="false" Height="200px" CssClass="ms-input" Style="border: 1px #666666 solid"></asp:TextBox>
                                </td>
                                <td width="10">
                                    <img height="1" width="10" alt="" src="/_layouts/images/blank.gif" />
                                </td>
                            </tr>
                            <tr>
                                <td>
                                </td>
                                <td class="ms-authoringcontrols">
                                    <asp:LinkButton runat="server" ID="lbChangeComments" Text="Change comments" OnClick="lbChangeComments_Click"></asp:LinkButton>
                                    <table>
                                        <tr>
                                            <td>
                                                <table cellspacing="0" cellpadding="0" class="vista_toolbar" width="150px" id="tblApplyComments"
                                                    runat="server" visible="false">
                                                    <tbody>
                                                        <tr>
                                                            <td valign="top" class="vista_toolbar_leftborder" />
                                                            <td align="center" class="vista_toolbar_content">
                                                                <table align="center">
                                                                    <tbody>
                                                                        <tr>
                                                                            <td align="center" />
                                                                            <td>
                                                                                <asp:LinkButton runat="server" ID="btnApplyComments" Text="Apply" OnClick="btnApplyComments_Click"></asp:LinkButton>
                                                                            </td>
                                                                        </tr>
                                                                    </tbody>
                                                                </table>
                                                            </td>
                                                        </tr>
                                                    </tbody>
                                                </table>
                                            </td>
                                            <td>
                                                <table cellspacing="0" cellpadding="0" class="vista_toolbar" width="150px" id="tblCancelCommentsChanging"
                                                    runat="server" visible="false">
                                                    <tbody>
                                                        <tr>
                                                            <td valign="top" class="vista_toolbar_leftborder" />
                                                            <td align="center" class="vista_toolbar_content">
                                                                <table align="center">
                                                                    <tbody>
                                                                        <tr>
                                                                            <td align="center" />
                                                                            <td>
                                                                                <asp:LinkButton runat="server" ID="LinkButton1" Text="Cancel" OnClick="btnCancelComments_Click"></asp:LinkButton>
                                                                            </td>
                                                                        </tr>
                                                                    </tbody>
                                                                </table>
                                                            </td>
                                                        </tr>
                                                    </tbody>
                                                </table>
                                            </td>
                                        </tr>
                                    </table>
                                </td>
                                <td width="10">
                                    <img height="1" width="10" alt="" src="/_layouts/images/blank.gif" />
                                </td>
                            </tr>
                            <tr>
                                <td>
                                </td>
                                <td>
                                    <img height="13" width="150" alt="" src="/_layouts/images/blank.gif" />
                                </td>
                                <td>
                                </td>
                            </tr>
                        </tbody>
                    </table>
                </td>
            </tr>
            <tr id="Tr1">
                <td height="1" colspan="2" class="ms-sectionline">
                </td>
            </tr>
        </tbody>
    </table>
</div>
